package jjn.round1;

/**
 * @author Jiang Jining
 * @since 2023-01-01 17:12
 */
public class LeetCode2351_RepeatedCharacter {
    public char repeatedCharacter(String s) {
        boolean[] digits = new boolean[27];
        for (char c : s.toCharArray()) {
            if (digits[c - 'a']) {
                return c;
            } else {
                digits[c - 'a'] = true;
            }
        }
        return 'a';
    }
}
